<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Basic ValidateBox - jQuery EasyUI Demo</title>
	<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../demo.css">
	<script type="text/javascript" src="../../jquery.min.js"></script>
	<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
	<h2>Basic ValidateBox</h2>
	<p>It's easy to add validate logic to a input box.</p>
	<div style="margin:20px 0;"></div>
    <form id="myform"target="_blank">
	<div class="easyui-panel" title="Register" style="width:400px;padding:10px 60px 20px 60px">
		<table cellpadding="5">
			<tr>
				<td>Birthday:</td>
				<td><input class="easyui-datebox textbox" data-options="required:true"></td>
			</tr>
			<tr>
				<td>Birthday:</td>
				<td><input class="easyui-datetimebox textbox" data-options="required:true"></td>
			</tr>
		</table>
        <input  onclick="return check()" value="提交">
	</div>
    </form>

	<script>
		function check()
		{
			if (!$("#myform").form('validate')) {
				$.messager.show({title: '错误提示', msg: '请填写必填项', timeout: 2000, showType: 'slide'});
				return false;
			}}
	</script>
	<style scoped="scoped">
		.textbox{
			height:20px;
			margin:0;
			padding:0 2px;
			box-sizing:content-box;
		}
	</style>

</body>
</html>